
#pragma once

#include "core/olisp_core.h"

#if defined( _MSC_VER )
#pragma message( "this is not completed yet" )
#else
#warning "this is not completed yet"
#endif

// TODO: assoc map
typedef struct assoc_context_t
{
    struct assoc_context_t * prev_ctx;
    struct assoc_pair_t *  pairs;

    size_t          length;
    size_t          allocated;
} assoc_context_t;

int do_associate( assoc_context_t * ctx, lisp_hash_t hash, obj_t * elem );

obj_t * get_associated_elem( assoc_context_t * ctx, obj_t * elem );

void dispose_assoc_context( assoc_context_t * ctx );
